package api

import (
	"coolcar/global"
	rentalpb "coolcar/proto/rental_out/v1"
	"net/http"

	"github.com/gin-gonic/gin"
)

func CreateTrip(c *gin.Context) {
	res, err := global.RentalHandler.CreateTrip(c, &rentalpb.CreateTripRequest{
		Start: nil,
		CarId: "",
	})
	if err != nil {
		c.JSON(http.StatusServiceUnavailable, gin.H{
			"msg": err.Error(),
		})
		return
	}

	c.JSON(http.StatusOK, res)
}
